import 'package:json_annotation/json_annotation.dart';

part 'invoice.g.dart';

@JsonSerializable()
class InvoiceAssistantModel {
  String month;
  List<AssistantInfoModel> children;

  InvoiceAssistantModel({ required this.month, this.children = const [] });

  factory InvoiceAssistantModel.fromJson(Map<String, dynamic> json) => _$InvoiceAssistantModelFromJson(json);

  Map<String, dynamic> toJson() => _$InvoiceAssistantModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}

@JsonSerializable()
class AssistantInfoModel {

  String lookUp;

  double amount;

  String remark;

  AssistantInfoModel({ required this.lookUp, required this.amount, required this.remark });

  factory AssistantInfoModel.fromJson(Map<String, dynamic> json) => _$AssistantInfoModelFromJson(json);

  Map<String, dynamic> toJson() => _$AssistantInfoModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}